// Include file with signal and syscall names
// They are placed here so they won't clutter the source.

#include "jrun.h"

// Signal names.
const char* signal_name[] = {
    "SIG_0",        /* 0 */
    "SIGHUP",       /* 1 */
    "SIGINT",       /* 2 */
    "SIGQUIT",      /* 3 */
    "SIGILL",       /* 4 */
    "SIGTRAP",      /* 5 */
    "SIGABRT",      /* 6 */
    "SIGBUS",       /* 7 */
    "SIGFPE",       /* 8 */
    "SIGKILL",      /* 9 */
    "SIGUSR1",      /* 10 */
    "SIGSEGV",      /* 11 */
    "SIGUSR2",      /* 12 */
    "SIGPIPE",      /* 13 */
    "SIGALRM",      /* 14 */
    "SIGTERM",      /* 15 */
    "SIGSTKFLT",    /* 16 */
    "SIGCHLD",      /* 17 */
    "SIGCONT",      /* 18 */
    "SIGSTOP",      /* 19 */
    "SIGTSTP",      /* 20 */
    "SIGTTIN",      /* 21 */
    "SIGTTOU",      /* 22 */
    "SIGURG",       /* 23 */
    "SIGXCPU",      /* 24 */
    "SIGXFSZ",      /* 25 */
    "SIGVTALRM",    /* 26 */
    "SIGPROF",      /* 27 */
    "SIGWINCH",     /* 28 */
    "SIGIO",        /* 29 */
    "SIGPWR",       /* 30 */
    "SIGSYS",       /* 31 */
    "SIGRTMIN",     /* 32 */
    0,
};

// System call names.
// TODO: numbers? WTF for?
const char* syscall_name[] = {
    "setup",
    "_exit",
    "fork",
    "read",
    "write",
    "open",
    "close",
    "waitpid",
    "creat",
    "link",
    "unlink",
    "execve",
    "chdir",
    "time",
    "mknod",
    "chmod",
    "lchown",
    "break",
    "oldstat",
    "lseek",
    "getpid",
    "mount",
    "oldumount",
    "setuid",
    "getuid",
    "stime",
    "ptrace",
    "alarm",
    "oldfstat",
    "pause",
    "utime",
    "stty",
    "gtty",
    "access",
    "nice",
    "ftime",
    "sync",
    "kill",
    "rename",
    "mkdir",
    "rmdir",
    "dup",
    "pipe",
    "times",
    "prof",
    "brk",
    "setgid",
    "getgid",
    "signal",
    "geteuid",
    "getegid",
    "acct",
    "umount",
    "lock",
    "ioctl",
    "fcntl",
    "mpx",
    "setpgid",
    "ulimit",
    "oldolduname",
    "umask",
    "chroot",
    "ustat",
    "dup2",
    "getppid",
    "getpgrp",
    "setsid",
    "sigaction",
    "siggetmask",
    "sigsetmask",
    "setreuid",
    "setregid",
    "sigsuspend",
    "sigpending",
    "sethostname",
    "setrlimit",
    "old_getrlimit",
    "getrusage",
    "gettimeofday",
    "settimeofday",
    "getgroups",
    "setgroups",
    "oldselect",
    "symlink",
    "oldlstat",
    "readlink",
    "uselib",
    "swapon",
    "reboot",
    "readdir",
    "old_mmap",
    "munmap",
    "truncate",
    "ftruncate",
    "fchmod",
    "fchown",
    "getpriority",
    "setpriority",
    "profil",
    "statfs",
    /* 100 */
    "fstatfs",
    "ioperm",
    "socketcall",
    "syslog",
    "setitimer",
    "getitimer",
    "stat",
    "lstat",
    "fstat",
    "olduname",
    "iopl",
    "vhangup",
    "idle",
    "vm86old",
    "wait4",
    "swapoff",
    "sysinfo",
    "ipc",
    "fsync",
    "sigreturn",
    "clone",
    "setdomainname",
    "uname",
    "modify_ldt",
    "adjtimex",
    "mprotect",
    "sigprocmask",
    "create_module",
    "init_module",
    "delete_module",
    "get_kernel_syms",
    "quotactl",
    "getpgid",
    "fchdir",
    "bdflush",
    "sysfs",
    "personality",
    "afs_syscall",
    "setfsuid",
    "setfsgid",
    "_llseek",
    "getdents",
    "select",
    "flock",
    "msync",
    "readv",
    "writev",
    "getsid",
    "fdatasync",
    "_sysctl",
    "mlock",
    "munlock",
    "mlockall",
    "munlockall",
    "sched_setparam",
    "sched_getparam",
    "sched_setscheduler",
    "sched_getscheduler",
    "sched_yield",
    "sched_get_priority_max",
    "sched_get_priority_min",
    "sched_rr_get_interval",
    "nanosleep",
    "mremap",
    "setresuid",
    "getresuid",
    "vm86",
    "query_module",
    "poll",
    "nfsservctl",
    "setresgid",
    "getresgid",
    "prctl",
    "rt_sigreturn",
    "rt_sigaction",
    "rt_sigprocmask",
    "rt_sigpending",
    "rt_sigtimedwait",
    "rt_sigqueueinfo",
    "rt_sigsuspend",
    "pread64",
    "pwrite64",
    "chown",
    "getcwd",
    "capget",
    "capset",
    "sigaltstack",
    "sendfile",
    "getpmsg",
    "putpmsg",
    "vfork",
    "getrlimit",
    "mmap2",
    "truncate64",
    "ftruncate64",
    "stat64",
    "lstat64",
    "fstat64",
    "lchown32",
    "getuid32",
    /* 200 */
    "getgid32",
    "geteuid32",
    "getegid32",
    "setreuid32",
    "setregid32",
    "getgroups32",
    "setgroups32",
    "fchown32",
    "setresuid32",
    "getresuid32",
    "setresgid32",
    "getresgid32",
    "chown32",
    "setuid32",
    "setgid32",
    "setfsuid32",
    "setfsgid32",
    "pivot_root",
    "mincore",
    "madvise",
    "getdents64",
    "fcntl64",
    "SYS_222",
    "security",
    "gettid",
    "readahead",
    "setxattr",
    "lsetxattr",
    "fsetxattr",
    "getxattr",
    "lgetxattr",
    "fgetxattr",
    "listxattr",
    "llistxattr",
    "flistxattr",
    "removexattr",
    "lremovexattr",
    "fremovexattr",
    "tkill",
    "sendfile64",
    "futex",
    "sched_setaffinity",
    "sched_getaffinity",
    "set_thread_area",
    "get_thread_area",
    "io_setup",
    "io_destroy",
    "io_getevents",
    "io_submit",
    "io_cancel",
    "fadvise64",
    "SYS_251",
    "exit_group",
    "lookup_dcookie",
    "epoll_create",
    "epoll_ctl",
    "epoll_wait",
    "remap_file_pages",
    "set_tid_address",
    "timer_create",
    "timer_settime",
    "timer_gettime",
    "timer_getoverrun",
    "timer_delete",
    "clock_settime",
    "clock_gettime",
    "clock_getres",
    "clock_nanosleep",
    "statfs64",
    "fstatfs64",
    "tgkill",
    "utimes",
    "fadvise64_64",
    "vserver",
    "mbind",
    "get_mempolicy",
    "set_mempolicy",
    "mq_open",
    "mq_unlink",
    "mq_timedsend",
    "mq_timedreceive",
    "mq_notify",
    "mq_getsetattr",
    "sys_kexec_load",
    "waitid",
    "SYS_285",
    "SYS_286",
    "SYS_287",
    "SYS_288",
    "SYS_289",
    "SYS_290",
    "SYS_291",
    "SYS_292",
    "SYS_293",
    "SYS_294",
    "SYS_295",
    "SYS_296",
    "SYS_297",
    "SYS_298",
    "SYS_299",
    /* 300 */
    "socket_subcall",
    "socket",
    "bind",
    "connect",
    "listen",
    "accept",
    "getsockname",
    "getpeername",
    "socketpair",
    "send",
    "recv",
    "sendto",
    "recvfrom",
    "shutdown",
    "setsockopt",
    "getsockopt",
    "sendmsg",
    "recvmsg",
    "ipc_subcall",
    "semop",
    "semget",
    "semctl",
    "semtimedop",
    "ipc_subcall",
    "ipc_subcall",
    "ipc_subcall",
    "ipc_subcall",
    "ipc_subcall",
    "ipc_subcall",
    "msgsnd",
    "msgrcv",
    "msgget",
    "msgctl",
    "ipc_subcall",
    "ipc_subcall",
    "ipc_subcall",
    "ipc_subcall",
    "ipc_subcall",
    "ipc_subcall",
    "shmat",
    "shmdt",
    "shmget",
    "shmctl",
    NULL,
};
